package com.kantboot.global.auth.web.admin.controller;

import com.kantboot.global.auth.annotation.AdminController;
import com.kantboot.global.auth.model.vo.AuthVO;
import com.kantboot.global.auth.util.AuthUtil;
import com.kantboot.global.rest.result.CommonSuccessStateCodeAndMsg;
import com.kantboot.util.common.result.RestResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@AdminController(code = "globeAuthWebAdminAuth")
@RestController
@RequestMapping("/globe-auth-web/admin/auth")
public class AuthControllerOfAdmin {

    /**
     * 获取所有AuthDTO
     */
    @PostMapping("/getAllAuthDTO")
    public RestResult<AuthVO> getAllAuthDTO() {
        return RestResult.success(AuthUtil.getAdminControllerAuth(this.getClass()),
                CommonSuccessStateCodeAndMsg.GET_SUCCESS);
    }

}
